#include <bits/stdc++.h>
using namespace std;

int main(){
	int a;
	double b;
	cin >> a;
	if(a <= 30){
		b += a*0.2;
		printf("%.2f",b);
		}			
	else{
		if(a <= 60 && a > 30){
			b += 30*0.2 + (a-30)*0.6;
			printf("%.2f",b);
		}
		else{
			cout << "NO" << endl;
		}
		} 
	return 0;
}
